import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)

// 1. 定义（路由）组件。
// 可以从其他文件 import 进来
import login from './components/login'
import register from './components/register'

export default new VueRouter({
  //mode: 'history',
  //base: __dirname,
  routes: [       
    { path: '/register', name: 'register', component:  register} ,
    { path: '/login', name: 'login', component: login},
    { path: '/', name: 'loginhome', component: login  }
    
  ]
})
